# -*- coding: utf-8 -*-
# 用于生成年周数的脚本

import datetime, time, sys

def get_week_list(year):
    d1 = datetime.datetime(year, 1, 1)
    weekday = int(d1.strftime("%w"))
    week = int(d1.strftime("%U"))
    d0 = d1 - datetime.timedelta(days=(weekday-1))
    #print weekday
    for i in range(0, 53):
        d = d0 + datetime.timedelta(days=7*i)
        dt = d + datetime.timedelta(days=5)
        #print d.strftime("%Y week"),str(i+1)+d.strftime(" %m.%d")+dt.strftime("~%m.%d")
        print(d.strftime("%Y week"),str(i+1)+d.strftime(" %m.%d")+dt.strftime("~%m.%d"))

if __name__ == "__main__":
    if len(sys.argv)==1:
        print("Usage: cal_week.py <year>")
    else:
        get_week_list(int(sys.argv[1]))
